<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/jsp/base/taglibs.jsp"%>
<%@include file="/WEB-INF/jsp/base/head.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>增加新闻</title>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/js/editor/kindeditor.js"></script>
<script type="text/javascript">
	var editor;
	KindEditor.ready(function(K) {
		editor = K.create('textarea[name="newsbean.content"]', {
			uploadJson :'<%=request.getContextPath()%>/js/editor/jsp/upload_json.jsp',
			fileManagerJson : '<%=request.getContextPath()%>/js/editor/jsp/file_manager_json.jsp',
			allowFileManager : true
		});
	});
</script>
</head>
<body>
	<div class="center_main"></div>
	<div id="page-top">
		<span>增加新闻</span> <b></b><i></i>
	</div>
	<div id="page">
		<s:form action="newsAction!newsAdd.do" namespace="/news" method="post">
			<div class="edit-wapper">
				<label class="lab">分类：</label>
				<s:select list="sortlist" id="codes" listKey="id" listValue="name"
					name="sortbean.id"></s:select>
			</div>
			<div class="edit-wapper">
				<label class="lab">标题：</label> <select name="newsbean.prefix">
					<option value="">无</option>
					<option value="前缀一">前缀一</option>
					<option value="前缀二">前缀二</option>
					<option value="前缀三">前缀三</option>
					<option value="前缀四">前缀四</option>
					<option value="前缀五">前缀五</option>
				</select> <input type="text" name="newsbean.title" id="name"
					class="inputText" maxlength="50" style="width: 450px"
					value="${newsbean.title }" /><label class="error">*&nbsp;&nbsp;<s:property
						value="%{errors['title'][0]}" /></label>
			</div>
			<div class="edit-wapper">
				<label class="lab">作者：</label> <input type="text"
					name="newsbean.createdName" class="inputText" />
			</div>
			<div class="edit-wapper">
				<label class="lab">属性：</label> <input type="checkbox" value="热门1"
					name="newsbean.property"> <input type="checkbox"
					value="热门2" name="newsbean.property"> <input
					type="checkbox" value="热门3" name="newsbean.property"> <input
					type="checkbox" value="热门4" name="newsbean.property"> <input
					type="checkbox" value="热门5" name="newsbean.property">
			</div>
			<div class="edit-wapper">
				<label class="lab">内容：</label>
				<textarea name="newsbean.content"
					style="min-width: 800px;" class="inputText"
					rows="20">${newsbean.content}</textarea>
				<label class="error">*&nbsp;&nbsp;<s:property
						value="%{errors['content'][0]}" /></label>
			</div>
			<div class="btn-wapper">
				<s:submit cssClass="form-btn" value="保存" id="btnEnter" />
				<s:submit cssClass="form-btn" value="返回" action="newsAction!getNews"></s:submit>
			</div>
		</s:form>
	</div>
	<div id="page-bottom"></div>
</body>
</html>